package com.ruoyi.web.sso.task;


import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 巡检统计定时任务 xj_data
 * 
 * @author #
 * @date 2021-11-25
 */
@Component
@Configuration      //1.主要用于标记配置类，兼备Component的效果。
@EnableScheduling   // 2.开启定时任务
public class TargetCountRecordTask
{

    String url = "pc.dev.dotflat.cn/api/xj_target_count_record/getAllTargetCountRecord";

    String url1 = "http://sso.ng.dev.dotflat.cn/api/sso/other_system/getStaffNameAndAreaName?staffId=94efaead3beb41a59bfd8424c27a7bfd&areaId=4b68762b57df48018a3df813dc471570";
    //3.添加定时任务
    @Scheduled(cron = "0 5 0 * * ?")
    //或直接指定时间间隔，例如：5秒
//    @Scheduled(fixedRate=5000)
//    @Scheduled(cron = "0 59 23 * * ?")
    private void configureTasks() {
//        String s = HttpUtil.sendPost(url , "");
//        System.out.println(s);
    }
}
